import { ApiPropertyOptional } from '@nestjs/swagger';
import { IsOptional, IsString, IsUUID } from 'class-validator';

export class QueryUserDto {
  @ApiPropertyOptional({ description: '用户名（模糊查询）' })
  @IsOptional()
  @IsString()
  username?: string;

  @ApiPropertyOptional({ description: '昵称（模糊查询）' })
  @IsOptional()
  @IsString()
  nickname?: string;

  @ApiPropertyOptional({ description: '手机号（模糊查询）' })
  @IsOptional()
  @IsString()
  phone?: string;

  @ApiPropertyOptional({ description: '角色ID' })
  @IsOptional()
  @IsUUID()
  roleId?: string;
}
